A Short Protocol of Class APL2TEX


Protocol Document


Method PRTEXWS
fileid PRTEXWS author wsid fileid 0 PRTEXWS author wsid fileid 1 PRTEXWS author wsid
PRTEXWS typesets all objects in the workspace. By default the functions and variables of APL2TEX are not included in the workspace print out. If you want to include the functions and variables used in the print processing, specify a left argument of 1. author and wsid are text vectors.


Protocol Internal


Method FV
return code vector of text lines FV file identifier vector of text lines FV file identifier
FV writes a vector of text lines to a file with variable record length or reads a file.


Method APLFNSLINE
APLFNSLINE text line
APLFNSLINE converts one line of APL code to a sequence of LATEX macros.


Method APLLINE
APLLINE text line
APLLINE typesets one line of text as a sequence of fixed spaced LATEX macros.


Method APLTOTEX
vector of lines APLTOTEX line of text vector of lines F APLTOTEX line of text vector of lines V APLTOTEX line of text
APLTOTEX translates a line of text into a sequence of LATEX macro calls. The default is variable spacing ( V).


Method APLTOTEXS
vector of lines APLTOTEXS line of text vector of lines F APLTOTEXS line of text vector of lines V APLTOTEXS line of text
APLTOTEXS translates a line of text into a sequence of latex macro calls, characters and numbers. This function should be used for preprocessing text which is interleaved with a few APL symbols and short APL expressions. The default is variable spacing (V), for fixed spacing use F.


Method DISPLAY
boxed representation of array DISPLAY array
DISPLAY draws a boxed diagram of any nested array. DISPLAY is functional equivalent to IBMs version.


Method FIXEDSPACING
boxed letter FIXEDSPACING letter
FIXEDSPACING boxes each letter in order to simulate equal spaced typing.


Method FNSFMT
vector representation FNSFMT canonical representation
FNSFMT translates the canonical function representation to the vector representation of the function.


Method FNSLIST
filename FNSLIST object name
FNSLIST formats a subsection header and the code to input the file which contains a LATEX macro stream which typesets the APL code of the APL object.


Method FOLD
folded text matrix FOLD text matrix
FOLD mimicks APL2s formatting algorithm for arrays. The matrix is cut in columns and the columns are printed one after the other. Broad tables can thus be restored by cut and paste.


Protocol Internal Local Adaption


Method BEGINARRAY
start of array macro sequence BEGINARRAY
BEGINARRAY defines the LATEX macros which precede an APL array.


Method ENDARRAY
end of array macro sequence ENDARRAY
ENDARRAY defines the LATEX macros which precede an APL array.


Method LOCALPAGE
latex macros defining the size of a local page LOCALPAGE
LOCALPAGE defines the size of a page. All relevant changes are made here.


Method PRINTINGWIDTH
integer PRINTINGWIDTH
PRINTINGWIDTH sets the number of characters per screen line. This value has to be set to the maximal numbers of characters per printed line.


Protocol Internal Translation Table


Method TEXM
translation tableTEXM
TEXM generates a translation table which maps EACH symbol of the atomic vector to a LATEX macro name.


Method TEXMS
translation table TEXMS
TEXMS generates a translation table which maps symbols of the atomic vector to a LATEX macro name. All standard characters are NOT mapped (lowercase alphabet, uppercase alphabet, numbers).


Protocol Internal Utility


Method FLAT
return code FLAT in file name
FLAT implements the recursive scan of the TEX files.


Method TOAPL
vector of lines TOAPL vector of lines
TOAPL translates a vector of tex lines to a vector of APL lines.


Method TOUPPER
upper case string TOUPPER lower case string
TOUPPER translates lower case to upper case and passes all other characters.


Protocol Logical Document Element


Method PRTEXARRAY
LaTeX code PRTEXARRAY variable name return code file name PRTEXARRAY variable name
PRTEXARRAY prints the LATEX code of variable to a file named by the CMS file name filename. variable is printed as displayed by the APL2 function . file name and variable name are text vectors.


Method PRTEXBOXEDARRAY
LaTeX code PRTEXBOXEDARRAY variable name return code file name PRTEXBOXEDARRAY variable name
PRTEXBOXEDARRAY prints the LATEX code of variable to a file named by the CMS file name filename. variable is printed in boxed representation as displayed by the APL2 function DISPLAY. file name and variable name are text vectors.


Method PRTEXDIALOG
LaTeX code PRTEXDIALOG APL expression return code file name PRTEXDIALOG APL expression
PRTEXDIALOG simulates and prints one interaction of user and computer. The right argument of PRTEXDIALOG is a text string containing the APL expression normally typed in by the user. User input is printed in bold face, six spaces indented with proportional spacing. The response of the APL interpreter (if any) is printed with fixed spacing thus simulating a traditional type writer.


Method PRTEXEXPR
LaTeX code PRTEXEXPR APL expression return code file name PRTEXEXPR APL expression
PRTEXEXPR takes a text string as right argument which is typeset as an APL expression typed in by the user: six spaces indented and bold face.


Method PRTEXFN
LaTeX code file name PRTEXFN function name LaTeX code file name PRTEXFN operator name return code file name PRTEXFN function name return code file name PRTEXFN operator name
PRTEXFN prints the LATEX code of the del-editor representation of a function or an operator to a file named by the CMS file name filename .


Method PRTEXFNCR
LaTeX code PRTEXFNCR function name LaTeX code PRTEXFNCR operator name return code file name PRTEXFNCR function name return code file name PRTEXFNCR operator name
PRTEXFNCR prints the LATEX code of the canonical representation of a function or an operator to a file named by the CMS file name filename .


Method PRTEXFNDD
LaTeX code PRTEXFNDD direct definition return code filename PRTEXFNDD direct definition
PRTEXFNDD prints the LATEX code of the direct definition of a function or operator to a file named by the CMS file name filename. The direct definition must be a character vector.


Protocol Utility


Method FILETOAPL
return code fileid in FILETOAPL fileid out
FILETOAPL converts the text of a cms file named fileid in from LATEX macros to APL2 symbols and writes the new text to a CMS file named fileid out .


Method FLATTEN
return code fileid out FLATTEN file name in return code FLATTEN file name in
FLATTEN recursively collects all small and scattered TEX files and writes one large file.